package electronics;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;

import common.CMultinomial;
import common.InterfaceTest;

/**
 *  optimal Multinomial : (true, 0.001, 12)
 * 	Taux r�ussite sur donn�es d�veloppement : 	80,3418803 %
 * 	Taux r�ussite sur donn�es de test :  		73,8461538 %

 */
public class TestClassifieurMultinomialElectronics extends InterfaceTest {

	public static void main(String args[]){
		
		listeFichiersApprentissage.add(new File("electronics/training.txt"));
		
		try {

			long start = System.currentTimeMillis(); 

			PrintWriter ecrivain;
			ecrivain =  new PrintWriter(new BufferedWriter(new FileWriter("Multinomial_electronics_training_test.csv")));

			ecrivain.println("MOTS_OUTILS_SUPPRIMES;SEUIL_FREQUENCE;EPSILON;NB_MOTS_DICO_FILTRE;TAUX_REUSSITE");

			CMultinomial cme = new CMultinomial
			(listeFichiersApprentissage, new File("electronics/test.txt"),true,0.001,12.0, false);
			cme.executerCreationClasseur();

			cme.MAJFichierCSVInfluenceSeuilFrequenceEtEpsilon(ecrivain);

			ecrivain.close();

			long time= System.currentTimeMillis(); 
			System.out.println("Programme : " + (((time - start)/1000)) + "secondes");
		}
		catch (Exception e){
			e.printStackTrace();
		}
	}
}
